package com.example.test_witns.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.gson.annotations.SerializedName;


public class Blog{
    @SerializedName("blog_ID")
    private long blog_ID;
    private String owner;
    private String owner_Avatar_URL;
    private String cover_Image_URL;
    private byte[] owner_Avatar_Bytes;
    private String content_Images_URL;
    private String main_title;
    private String subtitle;

    private String content;
    private int stars_num;
    private int likes_num;
    private int comments_num;
    private String publish_Time;

    public Blog(long blog_ID, String owner, String owner_Avatar_URL,
                String cover_Image_URL, byte[] owner_Avatar_Bytes, String content_Images_URL,
                String main_title,String subtitle, String content, int stars_num, int likes_num, int comments_num, String publish_Time) {
        this.blog_ID = blog_ID;
        this.owner = owner;
        this.owner_Avatar_URL = owner_Avatar_URL;
        this.cover_Image_URL = cover_Image_URL;
        this.owner_Avatar_Bytes = owner_Avatar_Bytes;
        this.content_Images_URL = content_Images_URL;
        this.main_title = main_title;
        this.subtitle = subtitle;
        this.content = content;
        this.stars_num = stars_num;
        this.likes_num = likes_num;
        this.comments_num = comments_num;
        this.publish_Time = publish_Time;
    }

    public String getMain_title() {
        return main_title;
    }

    public void setMain_title(String main_title) {
        this.main_title = main_title;
    }

    public String getSubtitle() {
        return subtitle;
    }

    public void setSubtitle(String subtitle) {
        this.subtitle = subtitle;
    }

    public long getBlog_ID() {
        return blog_ID;
    }

    public void setBlog_ID(long blog_ID) {
        this.blog_ID = blog_ID;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getOwner_Avatar_URL() {
        return owner_Avatar_URL;
    }

    public void setOwner_Avatar_URL(String owner_Avatar_URL) {
        this.owner_Avatar_URL = owner_Avatar_URL;
    }

    public String getCover_Image_URL() {
        return cover_Image_URL;
    }

    public void setCover_Image_URL(String cover_Image_URL) {
        this.cover_Image_URL = cover_Image_URL;
    }

    public byte[] getOwner_Avatar_Bytes() {
        return owner_Avatar_Bytes;
    }

    public void setOwner_Avatar_Bytes(byte[] owner_Avatar_Bytes) {
        this.owner_Avatar_Bytes = owner_Avatar_Bytes;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getStars_num() {
        return stars_num;
    }

    public void setStars_num(int stars_num) {
        this.stars_num = stars_num;
    }

    public int getLikes_num() {
        return likes_num;
    }

    public void setLikes_num(int likes_num) {
        this.likes_num = likes_num;
    }

    public int getComments_num() {
        return comments_num;
    }

    public void setComments_num(int comments_num) {
        this.comments_num = comments_num;
    }

    public String getPublish_Time() {
        return publish_Time;
    }

    public void setPublish_Time(String publish_Time) {
        this.publish_Time = publish_Time;
    }

    public String getContent_Images_URL() {
        return content_Images_URL;
    }

    public void setContent_Images_URL(String content_Images_URL) {
        this.content_Images_URL = content_Images_URL;
    }

    @JsonIgnore
    public Blog getBlog(){
        return this;
    }

    @Override
    public String toString() {
        return "Blog{" +
                "blogId=" + blog_ID +
                ", owner='" + owner + '\'' +
                ", ownerAvatarUrl='" + owner_Avatar_URL + '\'' +
                ", coverImageUrl='" + cover_Image_URL + '\'' +
                ", ownerAvatarBytes='" + owner_Avatar_Bytes + '\'' +
                ", contentImagesUrl='" + content_Images_URL + '\'' +
                ", mainTitle='" + main_title + '\'' +
                ", subtitle='" + subtitle + '\'' +
                ", content='" + content + '\'' +
                ", starsNum=" + stars_num +
                ", likesNum=" + likes_num +
                ", commentsNum=" + comments_num +
                ", publishTime='" + publish_Time + '\'' +
                '}';
    }

}
